<div class="col-md-12">
  <div class="box box-solid">
    <div class="box-header with-border">
      <h1 class="box-title" style="margin-top: 15px;">{{problemSet.name}}</h1>
      <div class="box-title scoreBanner">{{totalScore}}分</div>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
      <div class="row" style="margin: 0 0 20px;">
        <div class="col-md-6 col-sm-6">
          <!--<div style="text-align: center;" class="row">-->
            <!--<span>编程题</span>-->
            <!--<span>共 71 小题，共计 1090 分</span>-->
          <!--</div>-->
          <ol class="problemSetSummaryList_2vD0U">
              <li class="problemSetSummaryListItem_1_61u">
                <span>编程题</span>
                <span class="problemSetSummaryDetail_3VKmh">共 {{problemSet.problems.length}} 小题，共计 {{totalScore}} 分</span>
              </li>
          </ol>
        </div>
        <div class="col-md-6 col-sm-6">
          <div class="card">
            <div class="card-block">
              <div>
                高等教育出版社教材-{{problemSet.name}}
              </div>
            </div>
          </div>
        </div>
      </div>
      <!--<div class="my-alert-warning" role="alert">-->
        <!--<div class="row">-->
          <!--<div class="readerCodeHint col-md-6 col-sm-6">题目集仅供查看，请输入读者验证码答题。</div>-->
          <!--<div class="col-md-6 col-sm-6">-->
            <!--<div class="readerInputBar row">-->
              <!--<input type="text" style="height:26px;" placeholder="读者验证码" class="col-md-7 col-sm-7">-->
              <!--<div class="col-md-5 col-sm-5" style="padding: 0px;margin: 0px;">-->
                <!--<button class="my-btn btn-info">开始答题</button>-->
              <!--</div>-->
            <!--</div>-->
          <!--</div>-->
        <!--</div>-->
      <!--</div>-->
      <!--tabView-->
      <p-tabView [style]="{'width':'100%;'}" (onChange)="onTabChange($event)">
          <p-tabPanel header="编程题" [style]="{'border':'none'}" [selected]="true">
            <!--题目列表-->
            <div class="row" *ngIf="showTabFlag">
              <p-dataTable
                [value]="problemSet.problems"
                [style]="{'text-align':'center'}">
                <p-column field="code" header="标号"></p-column>
                <p-column field="title" header="标题">
                  <ng-template let-col let-data="rowData" let-ri="rowIndex" pTemplate="body">
                    <a style="color: #3c8dbc;" routerLink="/problem-sets/{{problemSet.code}}/problems/{{data.code}}">{{data.name}}</a>
                  </ng-template>
                </p-column>
                <p-column field="score" header="分数"></p-column>
                <p-column field="properties.passNumber" header="通过数"></p-column>
                <p-column field="properties.commitNumber" header="提交数"></p-column>
                <p-column field="properties.passRate" header="通过率"></p-column>
              </p-dataTable>
            </div>
            <div class="row" *ngIf="!showTabFlag">
              <div>
                <h4> {{problem.name}}（{{problem.score}} 分）</h4>
                <div class="row">
                  <div class="{{contentClass}}">
                    <div class="row">
                      <div class="col-md-9 col-md-9" [innerHTML]="problem.describeHtml">

                      </div>
                      <div class="problem-info  col-md-2 col-md-2">
                        <div>作者: {{problem.author}}</div>
                        <div>单位: {{problem.company}}</div>
                        <div>时间限制: {{problem.limitTime}}ms</div>
                        <div>内存限制: {{problem.limitMoney}}MB</div>
                        <div>代码长度限制: 16KB</div>
                      </div>
                    </div>
                  </div>
                  <div *ngIf="false" class="col-md-3 col-sm-3">
                    <div>
                      <div style="color: #6d6d6d;">
                        <div class="row">
                          <div>函数题</div>
                          <div>
                            <a *ngFor="let problem of problemSet.problems;index as i">
                              <span class="spanClass">{{i}}</span>
                            </a>
                          </div>
                        </div>
                        <div class="row"></div>
                      </div>
                    </div>
                  </div>
                  <!--<div style="clear: both;"></div>-->
                </div>
                  <hr>
                  <form>
                    <div style="margin-bottom: 1rem;">
                      <div class="row">
                        <div class="col-md-2 col-sm-2">
                          <label>编译器</label>
                        </div>
                        <div class="col-md-4 col-sm-4">
                          <select name="compile" [(ngModel)]="currentCompile" style="width: 100%;height: calc(2.09375rem + 2px);">
                            <option *ngFor="let name of compiles" value="{{name}}">{{name}}</option>
                            <!--<option value="Java">Java(openjdk)</option>-->
                          </select>
                        </div>
                      </div>
                    </div>
                    <div id="program" class="ace-tm" style="height: 500px;width: 100%;font-size: 14px;font-family: monospace;">
                      <textarea name="originCode" pInputTextarea [(ngModel)]="judgeInfo.originCode" style="height: 500px;width: 606px;resize:none;"></textarea>
                    </div>
                    <div style="text-align: center;width: 606px;margin-top: 10px;">
                      <button *ngIf="!canClick" class="btn btn-info" (click)="saveOriginCode()" disabled>提交</button>
                      <button *ngIf="canClick" class="btn btn-info" (click)="saveOriginCode()">提交</button>
                      <a routerLink="/problem-sets/{{setsCode}}/problems">
                        <button class="btn btn-default">返回</button>
                      </a>
                    </div>
                  </form>
                </div>
            </div>
          </p-tabPanel>
      </p-tabView>
      <!--/tabView-->
    </div>
    <!-- /.box-body -->
  </div>
  <!-- /.box -->
</div>
<p-dialog [(visible)]="submitFlag" [modal]="true" [responsive]="true" [width]="650" [minHeight]="600" [minWidth]="400" [minY]="70">
  <p-header>
   提交结果 <i style="cursor: pointer" class="glyphicon glyphicon-refresh" (click)="refresh()"></i>
  </p-header>
  <div style="min-height: 400px">
    <div class="box" style="margin-top: 1.25rem">
      <div class="box-body no-padding">
        <table class="table table-striped">
          <tr>
            <th>提交时间</th>
            <th>状态</th>
            <th>分数</th>
            <th>题目</th>
            <th>编译器</th>
            <th>耗时</th>
            <th>用户</th>
          </tr>
          <tr>
            <td>{{judgeInfo.createTime}}</td>
            <td>{{judgeInfo.statusName}}</td>
            <td>{{judgeInfo.score}}</td>
            <td>{{judgeInfo.name}}</td>
            <td>{{judgeInfo.compile}}</td>
            <td>{{judgeInfo.runTime}}</td>
            <td>{{judgeInfo.userCode}}</td>
          </tr>
        </table>
      </div>
    </div>

    <div class="box" style="margin-top: 1.25rem" *ngIf="judgeLines.length>0">
      <div class="box-body no-padding">
        <table class="table table-striped">
          <tr>
            <th>测试点</th>
            <th>提示</th>
            <th>结果</th>
            <th>耗时</th>
            <th>内存</th>
          </tr>
          <tr *ngFor="let line of judgeLines; let i = index;">
            <td>{{line.name}}</td>
            <td>{{line.remark}}</td>
            <td>{{line.statusName}}</td>
            <td>{{line.runTime}} ms</td>
            <td>{{line.runMemory}} KB</td>
          </tr>
        </table>
      </div>
    </div>
  <div class="col-md-3">
    代码
  </div>
  <div class="col-md-9" style="border-left:4px solid #f0f0f0; " [innerHTML]="originCode"></div>
  </div>
  <div>{{judgeInfo.remark}}</div>
  <p-footer>
    <button class="btn btn-success" (click)="hideDetail()">确认</button>
  </p-footer>
</p-dialog>

